"use strict";
cc._RF.push(module, 'b8dc8zLEC5MgbVS0MBijyad', 'WheelAloneItemManage');
// scripts/WheelAloneItemManage.js

"use strict";

var t = require;
var e = module;
var o = exports;

var _i,
    n = void 0 && (void 0).__extends || (_i = function i(t, e) {
  return (_i = Object.setPrototypeOf || {
    __proto__: []
  } instanceof Array && function (t, e) {
    t.__proto__ = e;
  } || function (t, e) {
    for (var o in e) {
      Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
    }
  })(t, e);
}, function (t, e) {
  function o() {
    this.constructor = t;
  }

  _i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o());
}),
    a = void 0 && (void 0).__decorate || function (t, e, o, i) {
  var n,
      a = arguments.length,
      r = a < 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);else for (var s = t.length - 1; s >= 0; s--) {
    (n = t[s]) && (r = (a < 3 ? n(r) : a > 3 ? n(e, o, r) : n(e, o)) || r);
  }
  return a > 3 && r && Object.defineProperty(e, o, r), r;
};

Object.defineProperty(o, "__esModule", {
  value: !0
});

var r = t("GameConstant"),
    s = t("GlobalUserData"),
    l = cc._decorator,
    c = l.ccclass,
    d = l.property,
    h = function (t) {
  function e() {
    var e = null !== t && t.apply(this, arguments) || this;
    return e.node_arrWheel = new Array(), e._nWheelType = 0, e._carTag = 0, e.collider = null, e;
  }

  return n(e, t), e.prototype.init = function (t, e, o, i) {
    this._nWheelType = t, this._carTag = e, s["default"].nCurGameType == r.Game_Type.PK ? this.node.scale = r.Game_Type_Scale.PK : s["default"].nCurGameType == r.Game_Type.PK_1 ? this.node.scale = r.Game_Type_Scale.PK_1 : s["default"].nCurGameType == r.Game_Type.PK_2 && (this.node.scale = r.Game_Type_Scale.PK_2);

    for (var n = 0; n < this.node_arrWheel.length; n++) {
      this.node_arrWheel[n].active = !1;
    }

    this.collider = this.node_arrWheel[t].getComponent(cc.PhysicsCircleCollider), this.collider.tag = o;
    var a = i;

    switch (e) {
      case r.Physics_Car_Tag.Right:
        a = cc.v3(-i.x, i.y, i.z);
        break;

      case r.Physics_Car_Tag.Left:
    }

    this.initWheelPos(a), this.node_arrWheel[t].active = !0;
  }, e.prototype.initWheelPos = function (t) {
    this.node.position = t;
  }, a([d(cc.Node)], e.prototype, "node_arrWheel", void 0), a([c], e);
}(cc.Component);

o["default"] = h;

cc._RF.pop();